/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       box.h
 * Author:     karooolek
 * Created on: 2009-09-30
 *
 **********************************************************************************************************************/

#ifndef BOX_H_
#define BOX_H_

#include "shape.h"
#include "vector3.h"
#include "quaternion.h"

namespace mGameEngine
{

/**
 * Oriented box in three-dimensional space.
 */
class Box : public Shape
{
private:
    /**
     * Size.
     */
    Vector3 _size;

    /**
     * Center position.
     */
    Vector3 _center;

    /**
     * Orientation.
     */
    Quaternion _orientation;

public:
    /**
     * Create box with specified center position, size and orientation.
     * @param size size.
     * @param center center position.
     * @param orientation orientation.
     */
    Box(const Vector3 &size = Vector3(1.0f, 1.0f, 1.0f),
        const Vector3 &center = Vector3(),
        const Quaternion &orientation = Quaternion());

    /**
     * Destroy box.
     */
    ~Box();

    /**
     * Get box size.
     * @return box size.
     */
    const Vector3 &getSize() const
    {
        return _size;
    }

    /**
     * Set box size.
     * @param size size.
     */
    void setSize(const Vector3 &size)
    {
        _size = size;
    }

    /**
     * Get box center position.
     * @return box center position.
     */
    const Vector3 &getCenter() const
    {
        return _center;
    }

    /**
     * Set box center position.
     * @param center center position.
     */
    void setCenter(const Vector3 &center)
    {
        _center = center;
    }

    /**
     * Get box orientation.
     * @return box orientation.
     */
    const Quaternion &getOrientation() const
    {
        return _orientation;
    }

    /**
     * Set box orientation.
     * @param orientation orientation.
     */
    void setOrientation(const Quaternion &orientation)
    {
        _orientation = orientation;
    }
};

}

#endif // BOX_H_
